import Vue from 'vue'
import Router from 'vue-router'
//import jv from "./api/jv.js"
import home from './view/home/Index.vue'
import index from "./view/Index"

Vue.use(Router);

export default new Router({
    mode: 'history',
    routes: [
        {
            path: '/',
            component: index,
            children: [
                {
                    path: "/",
                    component: home
                },
                {
                    path: "/loader",
                    component: () => import('./view/loader.vue')

                },
                {
                    path: '/dev',
                    component: () => import('./view/dev/Index.vue')
                },
                {
                    path: '/ops',
                    component: () => import('./view/ops/Index.vue')
                },
                {
                    path: '/ops/sys',
                    component: () => import('./view/ops/sys.vue')
                },
                {
                    path: '/test',
                    component: () => import( './view/home/test.vue' )
                }, {
                    path: '/product',
                    component: () => import( './view/product/Index.vue')
                },

                {
                    path: '/ops/docker',
                    component: () => import('./view/ops/docker.vue')
                },
                {
                    path: '/ops/app_docker',
                    component: () => import('./view/ops/app_docker.vue')
                },
                {
                    path: '/ops/mysql_dump',
                    component: () => import('./view/ops/mysql_dump.vue')
                },
                {
                    path: '/dev/template/json2LRJson',
                    component: () => import('./view/dev/template/json2LRJson.vue')
                },
                {
                    path: '/dev/wx-login',
                    component: () => import('./view/dev/wx-login.vue')
                },
                {
                    path: '/dev/jd',
                    component: () => import('./view/dev/Jd.vue')
                },
            ]
        },

        {
            path: '/noPermissoin',
            component: () => import( './view/common/noPermission.vue' )
        },


        {
            path: '/detail',
            component: () => import('./view/product/template/Detail.vue')
        },

    ]
});


//-----------------------------------
//jv.initRouter(router);

// export default router;


